package com.lark.algorithm.study.set;

import com.lark.algorithm.study.avl.AVLTree;

/**
 * @author btmood
 * @version 1.0
 * @apiNote
 * @since 2024-06-20 13:30
 */
public class AVLSet<E extends Comparable<E>> implements Set<E>{

    private AVLTree<E, ?> avl;

    public AVLSet() {
    }

    @Override
    public void add(E e) {
        avl.add(e, null);
    }

    @Override
    public void remove(E e) {
        avl.remove(e);
    }

    @Override
    public boolean contains(E e) {
        return avl.contains(e);
    }

    @Override
    public int getSize() {
        return avl.getSize();
    }

    @Override
    public boolean isEmpty() {
        return avl.isEmpty();
    }
}
